-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add TrafficPolicy, remap Policy -> TrafficPolicy #51
Conversation
2d010fb
to
4c77b46
Compare
4c77b46
to
18e3196
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -580,7 +588,11 @@ impl<'local> NativeSessionRsImpl<'local> { | |||
bldr.proxy_proto(ProxyProto::from(jeb.get_proxy_proto_version(self.env))); | |||
|
|||
if let Some(policy) = jeb.get_policy(self.env).of_string(self.env) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't we just drop this, it is still just the traffic_policy
right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uhhhh.....
yeah i think we could. I was trying to cover for the case where they set the member variable directly, but I forgot that Java has strong encapsulation, so these are only available through getters and setters. Which means we shooooould be able to remove it?
But if it's truly doing nothing, we can also just leave it and rip it out when we actually do the real deprecation of policy
at some point in...the next few months?
@nikolay-ngrok if you're ok leaving it until then then we can. If you'd rather it be removed now, lmk.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤷 happy to go either way 👍
Why
Currently, we are in the process of erasing strict policy types from our SDKs. This changes makes sure policy is sent to the backend as a traffic_policy string as opposed to a strictly formatted policy struct.
How
The traffic policy field already exists and functions in the underlying rust SDK. So all we have to do is plumb the new field through to Rust. Additionally, instances of Policy are remapped to traffic policy.
Validation
Current unit tests continue to run.
An additional unit test was added using the new TrafficPolicy field.
Additional Changes
Rust LSP
To make development easier, I added the rust SDK to our nix flake.
Bumping glibc to 2.28 in workflows
In our CI, we target/build against older versions of glibc to support customers on very old Linux. However, the checkout action provided by github has recently upgraded to Node 20, which needs a newer version than what we were targeting. For now, we are simply updating our version. However, if we end up needing to target older than 2.8, we will have to do a special workaround, as actions/checkout won't work without newer glibc versions.
Context: actions/checkout#1809